package File;

import java.io.File;
import java.io.IOException;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/3/6
 **/
public class MkDirDemo {
    public static void main(String[] args) throws IOException {
        File dir=new File("a");

        if(dir.exists()){
            System.out.println("1存在");
        }else {
            dir.mkdirs();
            System.out.println("该目录已存在");
        }
        for(int i=1;i<=10;i++){
            File file=new File("./text"+i+".txt");
            if(!file.exists()){
                file.createNewFile();
            }
        }

    }
}
